﻿@{
    Layout = null;
}

<form id="form_ApplyCodeAdd" role="form" class="form-horizontal" onkeydown="if(event.keyCode==13){return false;}">
    <div class="form-group">
        <div class="col-xs-2 col-md-2 text-right">
            申请机构:
        </div>
        <div class="col-xs-4 col-md-4">
            <input type="text" id="EnterpriseName" disabled="disabled" value=" " class="form-control" />
        </div>

        <div class="col-xs-2 col-md-2  text-right">
            申请人:
        </div>
        <div class="col-xs-4 col-md-4">
            <input type="text" id="ApplyUserName" disabled="disabled" name="ApplyUserName" value=" " class="form-control" />
        </div>
    </div>
    <div class="form-group">
        <div class="col-xs-2 col-md-2 text-right">
            <span class="red-700">*</span>申请码类型:
        </div>
        <div class="col-xs-4 col-md-4 text-left">
            <label for="CodeTypes">
                <input id="CodeTypes" type="checkbox" name="ApplyCodeTypes" value="1" disabled="disabled" class="CodeTypes" />&nbsp;服务码
            </label>
            <label for="CodeTypes_2">
                <input id="CodeTypes_2" type="checkbox" name="ApplyCodeTypes" value="2" style="margin-left:20px;" disabled="disabled" class="CodeTypes" />&nbsp;管理码
            </label>
            <input type="hidden" name="CodeFunc" id="CodeFunc" />
        </div>

        <div class="col-xs-2 col-md-2  text-right">
            应用产品:
        </div>
        <div class="col-xs-4 col-md-4">
            <input type="text" id="ProductName" disabled="disabled" value=" " class="form-control" />
        </div>
    </div>
    <div class="form-group">
        <div class="col-xs-2 col-md-2 text-right">
            产品规格:
        </div>
        <div class="col-xs-4 col-md-4">
            <input type="text" disabled="disabled" id="ApplyProductSize" name="ApplyProductSize" value=" " class="form-control" />
        </div>

        <div class="col-xs-2 col-md-2  text-right">
            <span class="red-700">*</span>
            申请数量
            <br />
            （单标）:
        </div>
        <div class="col-xs-4 col-md-4">
            <input type="text" disabled="disabled" id="ApplyCount" name="ApplyCount" value="" class="form-control" />
        </div>
    </div>
    <div class="form-group">
        <div class="col-xs-2 col-md-2  text-right">
            <span class="red-700">*</span>
            分配数量
            <br />
            （单标）:
        </div>
        <div class="col-xs-4 col-md-4">
            <input type="text" disabled="disabled" id="AllotCount" name="AllotCount" value="" class="form-control" />
        </div>
        <div class="col-xs-2 col-md-2  text-right">
            <span class="red-700">*</span>
            分配批次:           
        </div>
        <div class="col-xs-4 col-md-4">
            <input type="text" disabled="disabled" id="AllotBatch" name="AllotBatch" value="" class="form-control" />
        </div>
    </div>
    <div class="form-group">
        <div class="col-xs-2 col-md-2 text-right">          
            申请理由:
        </div>
        <div class="col-xs-10 col-md-10">
            <textarea class="form-control" disabled="disabled" id="ApplyReason" name="ApplyReason"></textarea>
        </div>
    </div>
</form>
<script type="text/javascript">
    if ($.MGJ.ApplyCode.DataModel) {
  
        $("#ApplyCount").val($.MGJ.ApplyCode.DataModel.ApplyCount);
        $("#CodeFunc").val($.MGJ.ApplyCode.DataModel.CodeFunc);
        $("#EnterpriseName").val($.MGJ.ApplyCode.DataModel.T_EnterpriseName);
        $("#ApplyUserName").val($.MGJ.ApplyCode.DataModel.ApplyUserName);
        $("#ApplyBrand").val($.MGJ.ApplyCode.DataModel.ApplyBrand);
        $("#ProductName").val($.MGJ.ApplyCode.DataModel.AllotProductName);
        $("#ApplyProductSize").val($.MGJ.ApplyCode.DataModel.ApplyProductSize);
        $("#AllotCount").val($.MGJ.ApplyCode.DataModel.AllotCount);
        
        $("#AllotBatch").val($.MGJ.ApplyCode.DataModel.AllotBatch)
        if ($.MGJ.ApplyCode.DataModel.F_EnterpriseId ==1)
        {
            if ($.MGJ.ApplyCode.DataModel.HasVerifie == 1) {
                $("#AllotCount").val($.MGJ.ApplyCode.DataModel.ApplyCount);
            }
        }
       
        $("#ApplyReason").val($.MGJ.ApplyCode.DataModel.ApplyReason);
    }
</script>